From: Jasper St. Pierre Date: Wed, 12 Jun 2013 03:39:56 +0000 (-0400) Subject: slider: Make clicking anywhere on the slider menu item pass to the slider X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3888 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0cee0e08e909dede06ca018248fe66ff611eb14a;p=gnome-shell.git slider: Make clicking anywhere on the slider menu item pass to the slider This is a regression from splitting the slider out that never got fixed. Restore the previous (useful) behavior by adding a public API to the slider that lets us pass an event through. https://bugzilla.gnome.org/show_bug.cgi?id=704368 --- diff --git a/js/ui/slider.js b/js/ui/slider.js index 9e5d33610..2076818bb 100644 --- a/js/ui/slider.js +++ b/js/ui/slider.js @@ -98,6 +98,10 @@ const Slider = new Lang.Class({ }, _startDragging: function(actor, event) { + this.startDragging(event); + }, + + startDragging: function(event) { if (this._dragging) // don't allow two drags at the same time return false; @@ -112,7 +116,6 @@ const Slider = new Lang.Class({ let absX, absY; [absX, absY] = event.get_coords(); this._moveHandle(absX, absY); - return true; }, diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index 0ffd30222..58c5ec67d 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -43,6 +43,10 @@ const StreamSlider = new Lang.Class({ this.item.addActor(this._icon, { align: St.Align.MIDDLE }); this.item.addActor(this._slider.actor, { expand: true }); + this.item.actor.connect('button-press-event', Lang.bind(this, function(actor, event) { + this._slider.startDragging(event); + })); + this._stream = null; },